package cate.game.role.farm.guildBoss;

import cate.game.play.proce.play.PlayPO;
import cate.game.role.Role;
import cate.game.role.farm.AbstractFarmFTC;
import cate.common.table.guild.guildboss.GuildBossCombatRow;

public class GuildBossFTC extends AbstractFarmFTC<MyGuildBossPO> {

    /** 当前挑战关卡的模板 */
    private GuildBossCombatRow tpl;

    public GuildBossFTC(Role role, GuildBossCombatRow tpl) {
        setup(role);
        this.tpl = tpl;
    }

    @Override
    protected MyGuildBossPO po(Role role) {
        return role.getFarm().guildBoss;
    }

    @Override
    public void handleResult(Role master, PlayPO play) {
        super.handleResult(master, play);
        long damage = GuildBossTools.calcDamage(play);
        GuildBossTools.handleResult(master, damage, tpl, false);
    }
}
